home *** CD-ROM | disk | FTP | other *** search
/ Directorty Opus 5 - Magellan 2 / Opus 5 - Magellan 2.iso / Extras / DLGoodies / cshell.dopus5 < prev    next >
Text File  |  1996-08-29  |  676b  |  36 lines

  1. /*
  2.  *  Invoke csh with the current directory either that of the source lister
  3.  *  or if inactive, in DefaultDir.
  4.  *
  5.  *  V1.0 (5.7.96) by David Lübbren.
  6.  *
  7.  *  Call: Arexx DOpus5:Arexx/cshell.dopus5 {Qp}
  8.  */
  9.  
  10. DefaultDir = 'ram:'
  11.  
  12. OPTIONS RESULTS
  13.  
  14. PARSE ARG dopusport
  15. IF dopusport ~= "" THEN ADDRESS VALUE dopusport
  16. ELSE DO
  17.   SAY "No DOpus running !"
  18.   EXIT
  19. END
  20.  
  21. SourcePath = DefaultDir
  22.  
  23. lister query SOURCE
  24. IF rc = 0 THEN DO
  25.   PARSE VAR result handle .
  26.   lister query handle path
  27.   IF rc = 0 THEN DO
  28.     SourcePath = STRIP(result, 'B', '"')
  29.   END
  30. END
  31.  
  32. PRAGMA('Directory', SourcePath)
  33. ADDRESS COMMAND 'Newshell CON:30/50/630/400//alt580/14/30/30/CLOSE from s:csh-startup'
  34. EXIT
  35.  
  36.